Ignore only root target directory
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 25 May 2017 16:47:15 +0000 (19:47 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 25 May 2017 16:47:15 +0000 (19:47 +0300)
commit06267a77ba0e3ca26f86c635562432c19a7498bb
treef353a13f793b83f8e006ffba42bfb337a087c7a2
parent381a4e76bb4c9d3ff89965a188605b066c103b02
Ignore only root target directory

We used to ignore all target directories, because it was common to
have multiple packages with different target directories in a single
repository. Now, when workspaces are here, such setups usually have a
single target, and we can .gitignore only it. It's useful because
sometimes you want to have a module named `target` in Rust.

If you use non-workspaced multi-package setup, you can create a
.gitignore with `/target/` for each package.
src/cargo/ops/cargo_new.rs